
<template>
  <div>
    <SearchForm
        @search="onSearch"
        @reset="onReset"
        :search-list="searchList" :search-params="searchParams">
    </SearchForm>

    <div class="table-layout">
      <el-card shadow="never">
        <div class="table-box">
          <el-table
              size="large"
              stripe
              border
              v-loading="loading"
              max-height="500px"
              :data="tableData"
              row-key="id"
              element-loading-spinner="el-icon-loading"
              element-loading-background="rgba(255, 255, 255, 0.8)"
              @selection-change="onSelect"
          >
            <el-table-column align="center" label="用户编号" prop="id" width="120px" />
            <el-table-column align="center" label="头像" prop="avatar" width="80px">
              <template #default="scope">
                <img :src="scope.row.avatar" style="width: 40px" />
              </template>
            </el-table-column>
            <el-table-column align="center" label="手机号" prop="mobile" width="120px" />
            <el-table-column align="center" label="昵称" prop="nickname" width="80px" />
          </el-table>
        </div>
      </el-card>

      <div class="page-box">
        <el-pagination
            background
            :current-page="pageNo"
            :page-sizes="pageSizes"
            :page-size="pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="totalSize"
            @size-change="changePageSize"
            @current-change="changePageNo"
        />
      </div>
    </div>
    <Add ref="addFormRef" @get-page="initData" />
  </div>
</template>
<script>

import crud from "@/mixins/crud";
import { http } from "@/api";
import Add from "./add";
export default {
  name: "index",
  components: {
    Add
  },
  mixins: [crud],
  data() {
    return {
      request:http.member,
      searchList: [
        {
          label: '姓名',
          prop: 'nickname',
          name: 'input',
          clearable: true
        },
        {
          label: '手机号',
          prop: 'mobile',
          name: 'input',
          clearable: true
        },
      ],
      searchParams: {
        nickname: '',
        mobile: ''
      },
      tableData: [

      ]
    }
  },
  methods: {
  }
}
</script>

<style scoped lang="scss">

</style>
